
var pageContext = new PageContextBsgrid(settings||{});

pageContext.formInit = function(layero){
	layero.find(".inputElem").mailAutoComplete();
	layero.delegate(".password","keyup change",function(e){
	   var value = $(this).val();
	   var targetname = $(this).attr("targetname");
	   var val = "";
	   val = encryptByAes(value,aesKey);
	   $(layero.find("input[name='"+targetname+"']").get(0)).val(val);
    }); 
}
//其他操作方法
pageContext.getOtherPingPuOperBtn = function(id){
	 return "";
}
pageContext.getOtherPingPuOperBtn = function(id){
	var  html = [];
	html.push('<button class="btn btn-xs btn-success detailBtn" val="'+id+'" title="发送">');
	html.push('<i class="ace-icon fa fa-search-plus bigger-120"></i>');
	html.push('</button>');
	 return "";html.join("");
}
pageContext.toAdd = function(){
//	var index = layer.open({
//	  type: 2,
//	  content: window.global.ctx+'/sys/email/toedit?_json=0',
//	  area: ['620px', '595px'],
//	  maxmin: true
//	});
//	layer.full(index);
	location = window.global.getFinalUrl(window.global.ctx+'/sys/email/toedit?_json=0&id=');
}
pageContext.toUpdate = function(id){
//	var index = layer.open({
//	  type: 2,
//	  content: window.global.ctx+'/sys/email/toedit?_json=0',
//	  area: ['620px', '595px'],
//	  maxmin: true
//	});
//	layer.full(index);
	location = window.global.getFinalUrl(window.global.ctx+'/sys/email/toedit?_json=0&id='+id);
}
pageContext.renderAddPageOther = function(layero,data,name,value){
	layero.find(".editor").attr("id","editor");
	pageContext.ue = UE.getEditor('editor');
 };
jQuery(function($) {
   pageContext.init();
	 $(document).find("input").each(function(){
		 $(this).attr("autocomplete","off");
	 });
   $("#searchForm .inputElem").mailAutoComplete();
}); 
